<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:s="http://jboss.com/products/seam/taglib"
      >
  <head>
   
  </head>    
  <body>
   <rich:modalPanel id="loading" resizeable="false" autosized="true" width="200" height="100">
		   <f:facet name="header">
		    <h:outputText value="#{messages['fina2.web.loading']}"/>
		   </f:facet>
		  <!--  
		   <a4j:status id="loading_status" startText="In Progress...." stopText="" onstop="Richfaces.hideModalPanel('loading');return false"/>
		     -->
		   
		   <div align="center">
		    <h:graphicImage value="../images/loading.gif"/>
		    <br/>
		    <h:outputText value="#{messages['fina2.web.converting.progress']}"/>
		   </div>
   </rich:modalPanel>
   
   <rich:toolBar id="all_toolbar"  itemSeparator="line"  >
    <rich:toolBarGroup rendered="#{menuManager.pageUrl=='../security/returnManager.seam'}">
        <a4j:commandButton title="Create Return" image="../images/create.gif" id="create_ret" onclick="Richfaces.showModalPanel('create_ret_panel'); return false;" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton title="Amend Return" image="../images/edit.gif" id="amend_ret" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton title="Remove Return" image="../images/remove.gif" id="delete_ret" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton title="Print Return" image="../images/print.gif" id="print_ret" style="width:16px; height:16px;border:0"/>
    </rich:toolBarGroup>
    <rich:toolBarGroup rendered="#{menuManager.pageUrl=='../security/data.seam'}">
        <a4j:commandButton title="Help" image="../images/help.gif" id="help" style="width:16px; height:16px;border:0"/>
        <form id="download_form" action="Download?id=">
            <a id="download_form_link" onclick="if(checkedCounter==0){ return false;}" href="Download?id=" style="cursor:auto">
                <img id="download_image" title="Download Selected Files" src="../images/save.gif" style="border:0px;opacity:0.4"/>
            </a>    
        </form>
        <s:link title="Refresh" onclick="Richfaces.showModalPanel('loading')" action="#{uploadBean.refreshData()}" rendered="#{menuManager.pageUrl=='../security/data.seam'}" reRender="filesForm:data_banks,filesForm:data_users"  id="refresh_data" >
            <h:graphicImage value="../images/refresh.gif" style="width:16px; height:16px;border:0" />
        </s:link>
        <s:link title="Print Data" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/data.seam'}" view="/security/dataPrint.seam">
            <h:graphicImage value="../images/print.gif" style="border:0"/>
        </s:link>
        <a4j:commandButton title="Next" image="../images/next.gif" id="next" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton title="Previuse" image="../images/previuse.gif" id="previuse" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton title="Top" image="../images/top.gif" id="top" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton title="End" image="../images/end.gif" id="end" style="width:16px; height:16px;border:0"/>
        <a4j:commandButton id="remFile" disabled="#{uploadBean.filesToRemove.size()==0}" oncomplete="Richfaces.hideModalPanel('loading')" onclick="Richfaces.showModalPanel('confirmation')"  image="../images/remove.gif" title="Click To Remove Selected Files" rendered="#{(userSession.currentUser.login.trim()=='sa')}" /> 
    </rich:toolBarGroup>
    
    <rich:toolBarGroup>
     <a4j:commandButton title="#{messages['fina2.create']}" rendered="#{menuManager.pageUrl=='../security/returnVersions.seam'}" disabled="#{(!userSession.hasPermission('fina2.returns.version.amend'))&amp;&amp;(!roleSession.hasPermission(userSession.currentUser.id,'fina2.returns.version.amend'))}" oncomplete="Richfaces.showModalPanel('returnVersionPanel')" image="../images/create.gif" id="create_rv" reRender="returnVersions" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.create']}" rendered="#{menuManager.pageUrl=='../security/bankTypes.seam'}" disabled="#{(!userSession.hasPermission('fina2.bank.amend'))&amp;&amp;(!roleSession.hasPermission(userSession.currentUser.id,'fina2.bank.amend'))}" oncomplete="Richfaces.showModalPanel('bankTypePanel')" image="../images/create.gif" id="create_bt" reRender="bankTypes" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.create']}" rendered="#{menuManager.pageUrl=='../security/licenceTypes.seam'}"  oncomplete="Richfaces.showModalPanel('licenceTypePanel')"  image="../images/create.gif" id="create_lic" reRender="licenceTypes" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.create']}" rendered="#{menuManager.pageUrl=='../security/periodTypes.seam'}" oncomplete="Richfaces.showModalPanel('periodTypePanel')" disabled="#{(!userSession.hasPermission('fina2.periods.amend'))&amp;&amp;(!roleSession.hasPermission(userSession.currentUser.id,'fina2.periods.amend'))}" image="../images/create.gif" id="create_pt" reRender="periodTypes" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.create']}" rendered="#{menuManager.pageUrl=='../security/returnTypes.seam'}" oncomplete="Richfaces.showModalPanel('returnTypePanel')"  image="../images/create.gif" id="create_rt" reRender="returnTypes" style="width:16px; height:16px;border:0"/>
     
     
     <s:link title="Print Data" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/data.seam'}" view="/security/dataPrint.seam">
         <h:graphicImage value="../images/print.gif" style="border:0"/>
     </s:link>
     <s:link title="Print Return Versions" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/returnVersions.seam'}" view="/security/returnVersionsPrint.xhtml">
         <h:graphicImage value="../images/print.gif" style="border:0" />
     </s:link>
     <s:link title="Print FI Types" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/bankTypes.seam'}"  view="/security/bankTypesPrint.xhtml">
         <h:graphicImage value="../images/print.gif" style="border:0"/>
     </s:link>
     <s:link title="Print License Types" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/licenceTypes.seam'}" view="/security/licenceTypesPrint.xhtml">
         <h:graphicImage value="../images/print.gif" style="border:0" />     
     </s:link>
     <s:link title="Print Period Types" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/periodTypes.seam'}" view="/security/periodTypesPrint.xhtml">
         <h:graphicImage value="../images/print.gif" style="border:0"/>
     </s:link>
     <s:link title="Print Permissions" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/userManager.seam'}" view="/security/userManagerPrint.xhtml">
         <h:graphicImage value="../images/print.gif" style="border:0"/>
     </s:link>
     <s:link title="Print FI s" target="_blank" style="border:0" rendered="#{menuManager.pageUrl=='../security/fiList.seam'}" view="/security/fiListPrint.xhtml">
         <h:graphicImage value="../images/print.gif" style="border:0" />
     </s:link>
    
     
     
     </rich:toolBarGroup>
    
    
    
    <rich:toolBarGroup rendered="#{menuManager.pageUrl=='../security/fiGroups.seam'}">
     <a4j:commandButton title="#{messages['fina2.create']}"  image="../images/create.gif" id="create_figr"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.amend']}"  image="../images/edit.gif" id="edit_figr"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.delete']}"  image="../images/remove.gif" id="remove_figr"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="#{messages['fina2.default']}"  image="../images/default.gif" id="setdefault_figr"  style="width:16px; height:16px;border:0"/>
    </rich:toolBarGroup>
    
    <rich:toolBarGroup  rendered="#{menuManager.pageUrl=='../security/fiList.seam'}">
     <a4j:commandButton action="#{fiBankAddData.flushPanel()}" title="Add Bank"  image="../images/create.gif" disabled="#{(!userSession.hasPermission('fina2.bank.amend'))&amp;&amp;(!roleSession.hasPermission(userSession.currentUser.id,'fina2.bank.amend'))}" oncomplete="Richfaces.showModalPanel('bank_add_panel')" reRender="bank_add_table" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton action="#{fiAddLicense.flushPanel()}" title="Add Licence"  image="../images/addLic.gif" disabled="true" oncomplete="Richfaces.showModalPanel('add_lic_panel')" reRender="add_lic_panel_table" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Add Management" image="../images/addMan.gif" disabled="#{!fiListTreeController.managementLabelSelected}" onclick="Richfaces.showModalPanel('add_man_panel')" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Add Branch" image="../images/addBrunch.gif" id="add_br" disabled="#{!fiListTreeController.branchLabelSelected}" onclick="Richfaces.showModalPanel('add_br_panel')" style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Add Branch Management" image="../images/addBrunchMan.gif" id="add_br_man"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Add History" image="../images/addHistory.gif" disabled="#{!fiListTreeController.historyLabelSelected}" onclick="Richfaces.showModalPanel('add_his_panel')" id="add_his"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Edit" image="../images/edit.gif" disabled="#{(!fiListTreeController.bankSelected)&amp;&amp;(!fiListTreeController.bankGroupSelected)}" onclick="Richfaces.showModalPanel('add_bank_panel')" id="edit_fi"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Remove" image="../images/remove.gif" id="remove_fi"  style="width:16px; height:16px;border:0"/>
     <a4j:commandButton title="Review" image="../images/review.gif" id="review_fi" disabled="#{!fiListTreeController.bankSelected}" onclick="Richfaces.showModalPanel('add_bank_panel')" style="width:16px; height:16px;border:0"/>
    
    </rich:toolBarGroup>
     
    <rich:toolBarGroup rendered="#{menuManager.pageUrl=='../security/regionCityManage.seam'}">
     <a4j:commandButton title="Add Region/City" image="../images/create.gif" onclick="Richfaces.showModalPanel('regcity_add_panel')" />
    </rich:toolBarGroup> 
     
     
   </rich:toolBar>
   
  </body>
</html>